package com.prb;

import com.prb.interceptor.JurInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootApplication
public class SssApplication {


    public static void main(String[] args) {
        SpringApplication.run(SssApplication.class , args);
    }



    @Bean
    public WebMvcConfigurer webMvcConfigurerAdapter(){
        return new WebMvcConfigurer(){

            @Override
            public void addInterceptors(InterceptorRegistry registry) {

                registry.addInterceptor(new JurInterceptor())
                        .addPathPatterns("/**").excludePathPatterns("/login/**");
            }
        };
    }

}
